import uvicorn
from fastapi import FastAPI

app = FastAPI()

@app.get('/user')
async def getUser():
    return {'name':'李欣桐'}

@app.get('/students')
async def getStudents():
    return [
        {'id':1,'name':'刘千琪', 'gender':'女'},
        {'id':2,'name':'崔龙腾', 'gender':'男'},
        {'id':3,'name':'姚晓冲', 'gender':'男'}
    ]

if __name__ == '__main__':
    uvicorn.run('main:app',host='127.0.0.1', port=8000, reload=True)